import request from '@/utils/request'

// 查询运行机器人参数列表
export function listMapping(query) {
  return request({
    url: '/platform/mapping/list',
    method: 'get',
    params: query
  })
}

// 查询运行机器人参数详细
export function getMapping(runningId) {
  return request({
    url: '/platform/mapping/' + runningId,
    method: 'get'
  })
}

// 新增运行机器人参数
export function addMapping(data) {
  return request({
    url: '/platform/mapping',
    method: 'post',
    data: data
  })
}

// 新增运行机器人参数
export function saveMappingList(data,query) {
  return request({
    url: '/platform/mapping/saveList',
    method: 'post',
    data: data,
    params:query
  })
}

// 修改运行机器人参数
export function updateMapping(data) {
  return request({
    url: '/platform/mapping',
    method: 'put',
    data: data
  })
}

// 删除运行机器人参数
export function delMapping(runningId) {
  return request({
    url: '/platform/mapping/' + runningId,
    method: 'delete'
  })
}

// 导出运行机器人参数
export function exportMapping(query) {
  return request({
    url: '/platform/mapping/export',
    method: 'get',
    params: query
  })
}

// 导出运行机器人参数
export function editOrSaveList(data) {
  return request({
    url: '/platform/mapping/editOrSaveList',
    method: 'put',
    data: data
  })
}
